import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import echarts from './views/charts/echarts.vue'
import HomePage from './views/charts/HomePage'
import Department from './views/org/department'
import Employee from './views/org/employee'
import Shop from "./views/org/shop";
import Register from './views/Register'
import User from  './views/user/user'
import Product from  './views/product/product'
import Pet from './views/pet/pet'
import Adopt from './views/pet/adopt'
let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/register',
        component: Register,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },//加一个菜单节点
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/homePage', component: HomePage, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '商铺管理' },
            { path: '/main', component: Main, name: '主页', hidden: true },

        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/user', component: User, name: '用户管理' },

        ]
    },
    {
        path: '/',
        component: Home,
        name: '商品管理',
        iconCls: 'fa fa-address-card',
       /* leaf: true,//只有一个节点*/
        children: [
            { path: '/product', component: Product, name: '商品管理' },
        ]
    },   {
        path: '/',
        component: Home,
        name: '宠物管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/pet', component: Pet, name: '宠物领养'},
            { path: '/adopt', component: Adopt, name: '宠物回收'},
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;